package com.exam.controller;

import com.exam.pojo.domain.Ranking;
import com.exam.pojo.vo.RankingVO;
import com.exam.service.IRankingService;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;

import java.util.List;

@RestController
@RequestMapping("/ranking")
@Api(tags = "排行榜")
@RequiredArgsConstructor
public class RankingController{

  private final IRankingService rankingService;

  @GetMapping("/list")
  @ApiOperation("查询月排行列表")
  public List<RankingVO> list(){
    return rankingService.list();
  }

}
